function [data,timeVec] = getDataAtTime(record,startTime,timeLength,electrodes)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% This function creates a data which can be analyzed.
%% The function inputs are:				
%% 	- record
%% 	- desired starting time                          
%%	- length of time desired
%% 	- electrodes desired. a vector of indices.
%% 	If the electrodes are not specified the function will
%% 	return all of the electodes 1-13.
%%
%% The function ouput is:
%% 	- The cropped data from the interval time depicted
%% 	- The time vector
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


if nargin < 4
    electrodes =  1:13;
end
samples = 200;
idx = (startTime * samples + 1):((startTime+timeLength) * samples + 1);
data = record(electrodes,idx);

timeVec = startTime:1/samples:(startTime+timeLength);


end